using Google.ProtocolBuffers;
using Google.ProtocolBuffers.Collections;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class QQFriendList : GeneratedMessageLite<QQFriendList, QQFriendList.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<QQFriendList, QQFriendList.Builder>
		{
			private bool resultIsReadOnly;
			private QQFriendList result;
			protected override QQFriendList.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override QQFriendList MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override QQFriendList DefaultInstanceForType
			{
				get
				{
					return QQFriendList.DefaultInstance;
				}
			}
			public uint GroupID
			{
				get
				{
					return this.result.GroupID;
				}
				set
				{
					this.SetGroupID(value);
				}
			}
			public uint Count
			{
				get
				{
					return this.result.Count;
				}
				set
				{
					this.SetCount(value);
				}
			}
			public IPopsicleList<QQFriendInGroup> QQFriendsList
			{
				get
				{
					return this.PrepareBuilder().qQFriends_;
				}
			}
			public int QQFriendsCount
			{
				get
				{
					return this.result.QQFriendsCount;
				}
			}
			public Builder()
			{
				this.result = QQFriendList.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(QQFriendList cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private QQFriendList PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					QQFriendList other = this.result;
					this.result = new QQFriendList();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override QQFriendList.Builder Clear()
			{
				this.result = QQFriendList.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override QQFriendList.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new QQFriendList.Builder(this.result);
				}
				return new QQFriendList.Builder().MergeFrom(this.result);
			}
			public override QQFriendList BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override QQFriendList.Builder MergeFrom(IMessageLite other)
			{
				if (other is QQFriendList)
				{
					return this.MergeFrom((QQFriendList)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override QQFriendList.Builder MergeFrom(QQFriendList other)
			{
				return this;
			}
			public override QQFriendList.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override QQFriendList.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(QQFriendList._qQFriendListFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = QQFriendList._qQFriendListFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 8u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 8u)
						{
							this.result.hasGroupID = input.ReadUInt32(ref this.result.groupID_);
							continue;
						}
					}
					else
					{
						if (num3 == 16u)
						{
							this.result.hasCount = input.ReadUInt32(ref this.result.count_);
							continue;
						}
						if (num3 == 26u)
						{
							input.ReadMessageArray<QQFriendInGroup>(num, text, this.result.qQFriends_, QQFriendInGroup.DefaultInstance, extensionRegistry);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public QQFriendList.Builder SetGroupID(uint value)
			{
				this.PrepareBuilder();
				this.result.hasGroupID = true;
				this.result.groupID_ = value;
				return this;
			}
			public QQFriendList.Builder ClearGroupID()
			{
				this.PrepareBuilder();
				this.result.hasGroupID = false;
				this.result.groupID_ = 0u;
				return this;
			}
			public QQFriendList.Builder SetCount(uint value)
			{
				this.PrepareBuilder();
				this.result.hasCount = true;
				this.result.count_ = value;
				return this;
			}
			public QQFriendList.Builder ClearCount()
			{
				this.PrepareBuilder();
				this.result.hasCount = false;
				this.result.count_ = 0u;
				return this;
			}
			public QQFriendInGroup GetQQFriends(int index)
			{
				return this.result.GetQQFriends(index);
			}
			public QQFriendList.Builder SetQQFriends(int index, QQFriendInGroup value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.qQFriends_[index] = value;
				return this;
			}
			public QQFriendList.Builder SetQQFriends(int index, QQFriendInGroup.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.qQFriends_[index] = builderForValue.Build();
				return this;
			}
			public QQFriendList.Builder AddQQFriends(QQFriendInGroup value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.qQFriends_.Add(value);
				return this;
			}
			public QQFriendList.Builder AddQQFriends(QQFriendInGroup.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.qQFriends_.Add(builderForValue.Build());
				return this;
			}
			public QQFriendList.Builder AddRangeQQFriends(IEnumerable<QQFriendInGroup> values)
			{
				this.PrepareBuilder();
				this.result.qQFriends_.Add(values);
				return this;
			}
			public QQFriendList.Builder ClearQQFriends()
			{
				this.PrepareBuilder();
				this.result.qQFriends_.Clear();
				return this;
			}
		}
		public const int GroupIDFieldNumber = 1;
		public const int CountFieldNumber = 2;
		public const int QQFriendsFieldNumber = 3;
		private static readonly QQFriendList defaultInstance;
		private static readonly string[] _qQFriendListFieldNames;
		private static readonly uint[] _qQFriendListFieldTags;
		private bool hasGroupID;
		private uint groupID_;
		private bool hasCount;
		private uint count_;
		private PopsicleList<QQFriendInGroup> qQFriends_ = new PopsicleList<QQFriendInGroup>();
		private int memoizedSerializedSize = -1;
		public static QQFriendList DefaultInstance
		{
			get
			{
				return QQFriendList.defaultInstance;
			}
		}
		public override QQFriendList DefaultInstanceForType
		{
			get
			{
				return QQFriendList.DefaultInstance;
			}
		}
		protected override QQFriendList ThisMessage
		{
			get
			{
				return this;
			}
		}
		public uint GroupID
		{
			get
			{
				return this.groupID_;
			}
		}
		public uint Count
		{
			get
			{
				return this.count_;
			}
		}
		public IList<QQFriendInGroup> QQFriendsList
		{
			get
			{
				return this.qQFriends_;
			}
		}
		public int QQFriendsCount
		{
			get
			{
				return this.qQFriends_.Count;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				if (!this.hasGroupID)
				{
					return false;
				}
				if (!this.hasCount)
				{
					return false;
				}
				using (IEnumerator<QQFriendInGroup> enumerator = this.QQFriendsList.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						QQFriendInGroup current = enumerator.get_Current();
						if (!current.IsInitialized)
						{
							return false;
						}
					}
				}
				return true;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasGroupID)
				{
					num += CodedOutputStream.ComputeUInt32Size(1, this.GroupID);
				}
				if (this.hasCount)
				{
					num += CodedOutputStream.ComputeUInt32Size(2, this.Count);
				}
				using (IEnumerator<QQFriendInGroup> enumerator = this.QQFriendsList.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						QQFriendInGroup current = enumerator.get_Current();
						num += CodedOutputStream.ComputeMessageSize(3, current);
					}
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private QQFriendList()
		{
		}
		public QQFriendInGroup GetQQFriends(int index)
		{
			return this.qQFriends_[index];
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] qQFriendListFieldNames = QQFriendList._qQFriendListFieldNames;
			if (this.hasGroupID)
			{
				output.WriteUInt32(1, qQFriendListFieldNames[1], this.GroupID);
			}
			if (this.hasCount)
			{
				output.WriteUInt32(2, qQFriendListFieldNames[0], this.Count);
			}
			if (this.qQFriends_.Count > 0)
			{
				output.WriteMessageArray<QQFriendInGroup>(3, qQFriendListFieldNames[2], this.qQFriends_);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasGroupID)
			{
				num ^= this.groupID_.GetHashCode();
			}
			if (this.hasCount)
			{
				num ^= this.count_.GetHashCode();
			}
			using (IEnumerator<QQFriendInGroup> enumerator = this.qQFriends_.GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					QQFriendInGroup current = enumerator.get_Current();
					num ^= current.GetHashCode();
				}
			}
			return num;
		}
		public override bool Equals(object value)
		{
			QQFriendList qQFriendList = value as QQFriendList;
			if (qQFriendList == null)
			{
				return false;
			}
			if (this.hasGroupID != qQFriendList.hasGroupID || (this.hasGroupID && !this.groupID_.Equals(qQFriendList.groupID_)))
			{
				return false;
			}
			if (this.hasCount != qQFriendList.hasCount || (this.hasCount && !this.count_.Equals(qQFriendList.count_)))
			{
				return false;
			}
			if (this.qQFriends_.Count != qQFriendList.qQFriends_.Count)
			{
				return false;
			}
			for (int i = 0; i < this.qQFriends_.Count; i++)
			{
				if (!this.qQFriends_[i].Equals(qQFriendList.qQFriends_[i]))
				{
					return false;
				}
			}
			return true;
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<QQFriendList, QQFriendList.Builder>.PrintField("GroupID", this.hasGroupID, this.groupID_, writer);
			GeneratedMessageLite<QQFriendList, QQFriendList.Builder>.PrintField("Count", this.hasCount, this.count_, writer);
			GeneratedMessageLite<QQFriendList, QQFriendList.Builder>.PrintField<QQFriendInGroup>("QQFriends", this.qQFriends_, writer);
		}
		public static QQFriendList ParseFrom(byte[] data)
		{
			return QQFriendList.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private QQFriendList MakeReadOnly()
		{
			this.qQFriends_.MakeReadOnly();
			return this;
		}
		public static QQFriendList.Builder CreateBuilder()
		{
			return new QQFriendList.Builder();
		}
		public override QQFriendList.Builder ToBuilder()
		{
			return QQFriendList.CreateBuilder(this);
		}
		public override QQFriendList.Builder CreateBuilderForType()
		{
			return new QQFriendList.Builder();
		}
		public static QQFriendList.Builder CreateBuilder(QQFriendList prototype)
		{
			return new QQFriendList.Builder(prototype);
		}
		static QQFriendList()
		{
			QQFriendList.defaultInstance = new QQFriendList().MakeReadOnly();
			QQFriendList._qQFriendListFieldNames = new string[]
			{
				"Count",
				"GroupID",
				"QQFriends"
			};
			QQFriendList._qQFriendListFieldTags = new uint[]
			{
				16u,
				8u,
				26u
			};
			object.ReferenceEquals(micromsg.Proto.QQFriendList.Descriptor, null);
		}
	}
}
